package cn.tedu.practice;

import java.util.Scanner;

/**本类练习正则表达式，包装类，自动装箱/自动拆箱，BigDecimal*/
public class TestRegexBoxBigDecimal {
    public static void main(String[] args) {


        String regex = "\\d{17}[0-9X]{1}";
        while(true) {
            System.out.println("请输入身份证号");
            String sc = new Scanner(System.in).nextLine();
            if (sc.matches(regex)) {
                System.out.println("输入正确");
                return;
            }
            System.out.println("输入错误");
        }


    }

}
